Skip to content

ci(release): adopt the shared npm release workflow standard - #7

Merged
shixish merged 2 commits into
mainfrom
chore/homogenize-release
Nov 27, 2026
Merged

shixish merged 2 commits into
mainfrom
chore/homogenize-release

Conversation

@shixish

@shixish shixish commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Why

Homogenize this repo's release process with the other npm TypeScript packages (@diffbot/typescript, @diffbot/ai-sdk, @diffbot/pi). The shared shape is based on diffbot-typescript's release.yml.

No version bump and no release is being cut.

Changes

  • verify: tag vs package.json, plus a required ## [X.Y.Z] CHANGELOG section (an RC may reuse the base section).
  • gates: now runs pnpm lint, typecheck, test, and build on Node 22 (the release workflow used to only build), then uploads the package artifact as before. The Node 20/22/24 matrix stays in ci.yml.
  • workers: the worker fixture's wrangler dry-run, as in ci.yml. Its vitest suite stays skipped (Treat package.json browser field similar to exports vitejs/vite#18340).
  • publish: still publishes the artifact with --ignore-scripts. A dispatch is a dry run. An already-published version is skipped so re-runs are safe. npm is pinned to ^11.21.0.
  • github-release: checks out the repo for CHANGELOG notes (instead of --generate-notes), marks - versions --prerelease, and still attaches dist/*.
  • CHANGELOG heading is now ## [0.2.0] - 2026-11-17 (heading line only).
  • CONTRIBUTING.md and CLAUDE.md describe the new gates, notes, prerelease flag, and RC vs final.

Trusted publishing (OIDC, no npm token) and the release.yml filename are unchanged. Artifact packaging is kept as the one genuine packaging difference.

Test plan

  • PR CI is green, including lint, typecheck, tests, build, and the workers wrangler dry-run.
  • The release workflow itself only runs on a v* tag or a manual dispatch; this PR does not tag or publish.

shixish and others added 2 commits November 27, 2026 12:28
Make release.yml match diffbot-typescript's shape (diffbot-dev-docs
docs/conventions/npm-release-workflow.md):

- verify: tag vs package.json plus a required `## [X.Y.Z]` CHANGELOG section.
- gates: pnpm lint, typecheck, test and build on Node 22 (the release used to
  only build), then upload the `package` artifact as before.
- workers: the worker fixture's wrangler dry-run, as in ci.yml. Its vitest
  suite stays skipped (vitejs/vite#18340).
- publish: still publishes the artifact with --ignore-scripts; now skips a
  version already on npm and does `npm publish --dry-run` on dispatch. npm
  pinned to ^11.21.0 instead of latest.
- github-release: checks out the repo for CHANGELOG notes instead of
  --generate-notes, marks "-" versions --prerelease, still attaches dist/*.

CHANGELOG heading becomes `## [0.2.0] - 2026-11-17`. CONTRIBUTING.md and
CLAUDE.md describe the new gates, notes, prerelease flag and RC vs final.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm >= 11.21 treats `npm publish --dry-run` of an already-published version
as an error ("You cannot publish over the previously published versions").
A dry-run dispatch of a current version therefore now packs the tarball
instead. A rehearsal of a not-yet-published version still uses
`npm publish --dry-run`. Tag-push publishes are unchanged.
@shixish
shixish merged commit b071279 into main Nov 27, 2026
11 checks passed
@shixish
shixish deleted the chore/homogenize-release branch November 27, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant